package services

import (
    "context"
    "gitee.com/go-libs/db-xorm/db"
    "integration/app/models"
)

func (o *OrderCartInfoService) ListByOrderId(ctx context.Context, val int) (list []*models.OrderCartInfo, err error) {
    var sess *db.Session

    if sess, err = o.Slave(ctx); err != nil {
        return
    }

    err = sess.Where("`oid` = ?", val).Find(&list)
    return
}
